﻿using System;

public class PropertyChangedEventArgs : EventArgs
{
    private string name;
    private object oldValue;
    private object newValue;

    public delegate void PropertyChangedEventHandler(object sender, PropertyChangedEventArgs e);


    public string Name
    {
        get { return name; }
        set { name = value; }
    }
    
    public object OldValue
    {
        get { return oldValue; }
        set { oldValue = value; }
    }

    public object NewValue
    {
        get { return newValue; }
        set { newValue = value; }
    }

    public PropertyChangedEventArgs(string name, object oldValue, object newValue)
    {
        this.name = name;
        if (oldValue != null)
        {
            this.oldValue = oldValue;
        }
        else
        {
            this.oldValue = new object();
        }
        if (newValue != null)
        {
            this.newValue = newValue;
        }
        else
        {
            this.newValue = new object();
        }
    }
}
